<html>
<head>
    <meta charset="UTF-8">
    <title>edituser</title>
    <link rel="stylesheet" type="text/css" href="./bootstrap-3.3.5-dist/css/bootstrap.min.css">
</head>
<?php
$row=$data['user'];//读来uid对用用户的信息
?>
<body>
<form class="form-horizontal" method="post" action="admin.php?c=user&m=updateuser" enctype="multipart/form-data"><!--文件上传必须要用post-->
<input type="hidden" name="uid" value="<?php echo $row['uid'];?>">
    <h2><center>修改用户信息</center></h2>
<div class="form-group">
    <label for="inputEmail3" class="col-md-3 control-label">姓名</label>
    <div class="col-md-6">
      <input type="text" class="form-control" id="inputEmail3" placeholder="姓名" name="username" value="<?php echo $row['uname'];?>"><!--placeholder 站位-->
    </div>
  </div>

  <div class="form-group">
    <label for="inputGender3" class="col-md-3 control-label">性别</label>
    <div class="col-md-6">
      <label class="radio-inline">
  <input type="radio" name="gender" id="inlineRadio1" value="0" <?php if ($row['gender']==0){
        echo "checked";
        }?>> 男
</label>
<label class="radio-inline">
  <input type="radio" name="gender" id="inlineRadio2" value="1" <?php if ($row['gender']==1){
        echo "checked";
        }?>> 女
</label>
    </div>
  </div>

  <div class="form-group">
    <label for="inputDate3" class="col-md-3 control-label">生日</label>
    <div class="col-md-6">
      <input type="date" class="form-control" id="inputDate3" placeholder="生日" name="birthdate" value="<?php echo $row['birthdate'];?>"><!--placeholder 站位-->
    </div>
    </div>

    <div class="form-group">
    <label for="inputHobby3" class="col-md-3 control-label">爱好</label>
    <div class="col-md-6">
      <label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox1" name="hobby[]" value="旅游" <?php if (strstr(
$row['hobby'], '旅游')) {
        echo "checked";
    }?>> 旅游
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox2" name="hobby[]" value="登山" <?php if (strstr(
$row['hobby'], '登山')) {
        echo "checked";
    }?>> 登山
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox3" name="hobby[]" value="上网" <?php if (strstr(
$row['hobby'], '上网')) {
        echo "checked";
    }?>> 上网
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox3" name="hobby[]" value="游泳" <?php if (strstr(
$row['hobby'], '游泳')) {
        echo "checked";
    }?>> 游泳
</label>
    </div>
    </div>

    <div class="form-group">
    <label for="inputDegree3" class="col-md-3 control-label">学历</label>
    <div class="col-md-6">
      <select class="form-control" name="degree">
  <option value="1" <?php if ($row['degree']==1){
        echo "selected";}?>>高中</option>
  <option value="2" <?php if ($row['degree']==2){
        echo "selected";}?>>大学</option>
  <option value="3" <?php if ($row['degree']==3){
        echo "selected";}?>>研究生</option>
  <option value="4" <?php if ($row['degree']==4){
        echo "selected";}?>>博士</option>
</select>
    </div>
    </div>

    <div class="form-group">
    <label for="inputIntro3" class="col-md-3 control-label">自我介绍</label>
    <div class="col-md-6">
      <textarea class="form-control" rows="3" id="inputIntro3" name="intro"><?php echo $row['intro']?></textarea>
    </div>
  </div>

    <div class="form-group">
    <label for="inputImg3" class="col-md-3 control-label">头像</label>
    <div class="col-md-6">
       <input type="file" id="inputImg3" name="pic">
       原海报:<img src="./posters/<?php echo $row['pic'];?>"width="80"height="80"alt="">;
    </div>
  </div>

    <div class="form-group">
    <div class="col-md-offset-3 col-md-6">
      <button type="submit" class="btn btn-default">修改</button>
    </div>
  </div>

</form>
</body>
</html>
